

package NinetyNine;

import java.io.Serializable;

/**
 *
 * @author JOKE
 * Score
 */
public class Score implements Serializable, Comparable<Score> {
    private String user = null;

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }
    private double score = 0;

    public Score(String user, double score) {
        this.user = user;
        this.score = score;
    }

    public int compareTo(Score comp) {
        if(this.score>comp.score) {
            return 1;
        } else if(this.score==comp.score) {
            return 0;
        } else {
            return -1;
        }
    }
}
